package demo23;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sr=new Scanner(System.in);
        int n=sr.nextInt();
        int t;
        for (int i = 0; i < n; i++) {
            t=i+1;
            for (int j = i; j < n; j++) {
                System.out.printf("%4d",t);
                t=t+(n-j+i);
            }
            System.out.println();
        }
    }
}
